package com.foreverwin.jzymes.common.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.foreverwin.jzymes.common.mapper.ResourceTimeSummaryMapper;
import com.foreverwin.jzymes.common.domain.ResourceTimeSummary;
import com.foreverwin.jzymes.common.service.IResourceTimeSummaryService;

/**
 * 设备运行时间统计 服务层实现
 * 
 * @author ervin
 * @date 2019-06-22
 */
@Service
public class ResourceTimeSummaryServiceImpl implements IResourceTimeSummaryService
{
	@Autowired
	private ResourceTimeSummaryMapper resourceTimeSummaryMapper;

	/**
     * 查询设备运行时间统计信息
     * 
     * @param handle 设备运行时间统计ID
     * @return 设备运行时间统计信息
     */
    @Override
	public ResourceTimeSummary selectResourceTimeSummaryById(String handle)
	{
	    return resourceTimeSummaryMapper.selectResourceTimeSummaryById(handle);
	}
	
	/**
     * 查询设备运行时间统计列表
     * 
     * @param resourceTimeSummary 设备运行时间统计信息
     * @return 设备运行时间统计集合
     */
	@Override
	public List<ResourceTimeSummary> selectResourceTimeSummaryList(ResourceTimeSummary resourceTimeSummary)
	{
	    return resourceTimeSummaryMapper.selectResourceTimeSummaryList(resourceTimeSummary);
	}
	
    /**
     * 新增设备运行时间统计
     * 
     * @param resourceTimeSummary 设备运行时间统计信息
     * @return 结果
     */
	@Override
	public int insertResourceTimeSummary(ResourceTimeSummary resourceTimeSummary)
	{
	    return resourceTimeSummaryMapper.insertResourceTimeSummary(resourceTimeSummary);
	}
	
	/**
     * 修改设备运行时间统计
     * 
     * @param resourceTimeSummary 设备运行时间统计信息
     * @return 结果
     */
	@Override
	public int updateResourceTimeSummary(ResourceTimeSummary resourceTimeSummary)
	{
	    return resourceTimeSummaryMapper.updateResourceTimeSummary(resourceTimeSummary);
	}

	/**
     * 删除设备运行时间统计对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteResourceTimeSummaryByIds(String ids)
	{
		return resourceTimeSummaryMapper.deleteResourceTimeSummaryByIds(ids.split(","));
	}
	
}
